package net.lab1024.sa.admin.module.business.core.material.domain.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 物料信息表 新建表单
 *
 * @Author ADog
 * @Date 2025-09-19 16:40:32
 * @Copyright 1.0
 */

@Data
public class MaterialAddForm {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long materialId;

    @Schema(description = "物料分类ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "物料分类ID 不能为空")
    private Long materialCategoryId;

    @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String materialCode;

    @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "物料名称 不能为空")
    private String materialName;

    @Schema(description = "物料规格", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "物料规格 不能为空")
    private String materialSpecification;

    @Schema(description = "物料单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "物料单位 不能为空")
    private String materialUnit;

    @Schema(description = "物料来源类型(0：自制 1：外购)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "物料来源类型(0：自制 1：外购) 不能为空")
    private Integer materialSourceType;

    @Schema(description = "物料分类类型（0：原材料,1：半成品,2：产成品）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "物料分类类型（0：原材料,1：半成品,2：产成品） 不能为空")
    private Integer materialCategoryType;

    @Schema(description = "条形码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "条形码 不能为空")
    private String materialBarcode;

    @Schema(description = "版本号（用于乐观锁）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "版本号（用于乐观锁） 不能为空")
    private Integer version;

    @Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer deletedFlag;

    @Schema(description = "禁用状态", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer disabledFlag;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime updateTime;

}